package com.zp.self.module.level_4_算法练习.算法.排序.算法题;

/**
 * @author By ZengPeng
 * @Description
 * @date in  2020/10/10 14:50
 * @Modified By
 */
public class 力扣_7_整数反转 {
    public static void main(String[] args) {
        System.out.println( new 力扣_7_整数反转().reverse11(123));
    }

    public int reverse11(int x) {
        long n =0;
        while (x!=0){
            n = n*10 +x%10;
            x=x/10;
        }
        return (int)n ==n ? (int)n : 0 ;
    }
}
